Failed
JobEngineService execute job on device connect.Executing Job And Then Restarting Device (from org.eclipse.kapua.integration.service.jobScheduling.RunExecuteOnDeviceConnectI9nTest)
Error Message
An internal error occurred: org.apache.shiro.ShiroException: Unexpected error while looking for the user!.
Stacktrace
org.eclipse.kapua.KapuaException: An internal error occurred: org.apache.shiro.ShiroException: Unexpected error while looking for the user!. at org.eclipse.kapua.KapuaException.internalError(KapuaException.java:99) at org.eclipse.kapua.service.authentication.shiro.AuthenticationServiceShiroImpl.handleTokenLoginException(AuthenticationServiceShiroImpl.java:523) at org.eclipse.kapua.service.authentication.shiro.AuthenticationServiceShiroImpl.login(AuthenticationServiceShiroImpl.java:234) at org.eclipse.kapua.service.user.steps.UserServiceSteps.loginUser(UserServiceSteps.java:586) at ✽.I login as user with name "kapua-sys" and password "kapua-password"(classpath:features/jobScheduling/ExecuteOnDeviceConnectI9n.feature:207) Caused by: org.apache.shiro.authc.AuthenticationException: org.apache.shiro.ShiroException: Unexpected error while looking for the user! at org.eclipse.kapua.service.authentication.shiro.KapuaAuthenticator.doMultiRealmAuthentication(KapuaAuthenticator.java:87) at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doAuthenticate(ModularRealmAuthenticator.java:275) at org.apache.shiro.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:198) at org.apache.shiro.mgt.AuthenticatingSecurityManager.authenticate(AuthenticatingSecurityManager.java:106) at org.apache.shiro.mgt.DefaultSecurityManager.login(DefaultSecurityManager.java:275) at org.apache.shiro.subject.support.DelegatingSubject.login(DelegatingSubject.java:260) at org.eclipse.kapua.service.authentication.shiro.AuthenticationServiceShiroImpl.login(AuthenticationServiceShiroImpl.java:217) at org.eclipse.kapua.service.user.steps.UserServiceSteps.loginUser(UserServiceSteps.java:586) at jdk.internal.reflect.GeneratedMethodAccessor123.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at io.cucumber.java.Invoker.doInvoke(Invoker.java:66) at io.cucumber.java.Invoker.invoke(Invoker.java:24) at io.cucumber.java.AbstractGlueDefinition.invokeMethod(AbstractGlueDefinition.java:47) at io.cucumber.java.JavaStepDefinition.execute(JavaStepDefinition.java:29) at io.cucumber.core.runner.CoreStepDefinition.execute(CoreStepDefinition.java:66) at io.cucumber.core.runner.PickleStepDefinitionMatch.runStep(PickleStepDefinitionMatch.java:63) at io.cucumber.core.runner.ExecutionMode$1.execute(ExecutionMode.java:10) at io.cucumber.core.runner.TestStep.executeStep(TestStep.java:92) at io.cucumber.core.runner.TestStep.run(TestStep.java:64) at io.cucumber.core.runner.PickleStepTestStep.run(PickleStepTestStep.java:51) at io.cucumber.core.runner.TestCase.run(TestCase.java:104) at io.cucumber.core.runner.Runner.runPickle(Runner.java:73) at io.cucumber.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:151) at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:135) at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:27) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at io.cucumber.junit.Cucumber.runChild(Cucumber.java:200) at io.cucumber.junit.Cucumber.runChild(Cucumber.java:90) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at io.cucumber.junit.Cucumber$RunCucumber.evaluate(Cucumber.java:235) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:377) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:284) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:248) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:167) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:456) at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:169) at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:595) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:581) Caused by: org.apache.shiro.ShiroException: Unexpected error while looking for the user! at org.eclipse.kapua.service.authentication.shiro.realm.UserPassAuthenticatingRealm.doGetAuthenticationInfo(UserPassAuthenticatingRealm.java:80) at org.apache.shiro.realm.AuthenticatingRealm.getAuthenticationInfo(AuthenticatingRealm.java:571) at org.eclipse.kapua.service.authentication.shiro.KapuaAuthenticator.doMultiRealmAuthentication(KapuaAuthenticator.java:61) ... 50 more Caused by: org.eclipse.kapua.KapuaException: An internal error occurred: Error during Persistence Operation. at org.eclipse.kapua.KapuaException.internalError(KapuaException.java:84) at org.eclipse.kapua.commons.util.KapuaExceptionUtils.convertPersistenceException(KapuaExceptionUtils.java:107) at org.eclipse.kapua.commons.jpa.JpaTxContext.convertPersistenceException(JpaTxContext.java:78) at org.eclipse.kapua.storage.TxManagerImpl.execute(TxManagerImpl.java:61) at org.eclipse.kapua.service.user.internal.UserServiceImpl.findByName(UserServiceImpl.java:288) at org.eclipse.kapua.service.authentication.shiro.realm.UserPassAuthenticatingRealm.lambda$doGetAuthenticationInfo$0(UserPassAuthenticatingRealm.java:76) at org.eclipse.kapua.commons.security.KapuaSecurityUtils.doPrivileged(KapuaSecurityUtils.java:116) at org.eclipse.kapua.service.authentication.shiro.realm.UserPassAuthenticatingRealm.doGetAuthenticationInfo(UserPassAuthenticatingRealm.java:76) ... 52 more Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.12.v20230209-e5c4074ef3): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms. Error Code: 0 Call: SELECT attributes, created_on, description, display_name, email, expiration_date, external_id, external_username, modified_on, name, optlock, phone_number, properties, status, user_type, created_by, id, modified_by, scope_id FROM usr_user WHERE (name = ?) bind => [1 parameter bound] Query: ReadAllQuery(referenceClass=UserImpl sql="SELECT attributes, created_on, description, display_name, email, expiration_date, external_id, external_username, modified_on, name, optlock, phone_number, properties, status, user_type, created_by, id, modified_by, scope_id FROM usr_user WHERE (name = ?)") at org.eclipse.persistence.internal.jpa.QueryImpl.getDetailedException(QueryImpl.java:391) at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:264) at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:482) at org.eclipse.kapua.commons.jpa.KapuaEntityJpaRepository.doFindAllByField(KapuaEntityJpaRepository.java:678) at org.eclipse.kapua.commons.jpa.KapuaEntityJpaRepository.doFindByField(KapuaEntityJpaRepository.java:629) at org.eclipse.kapua.commons.jpa.KapuaNamedEntityJpaRepository.findByName(KapuaNamedEntityJpaRepository.java:52) at org.eclipse.kapua.commons.storage.KapuaNamedEntityRepositoryCachingWrapper.findByNameCached(KapuaNamedEntityRepositoryCachingWrapper.java:63) at org.eclipse.kapua.commons.storage.KapuaNamedEntityRepositoryCachingWrapper.findByName(KapuaNamedEntityRepositoryCachingWrapper.java:50) at org.eclipse.kapua.service.user.internal.UserServiceImpl.lambda$findByName$11(UserServiceImpl.java:288) at org.eclipse.kapua.storage.TxManagerImpl.execute(TxManagerImpl.java:50) ... 56 more Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.12.v20230209-e5c4074ef3): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms. Error Code: 0 Call: SELECT attributes, created_on, description, display_name, email, expiration_date, external_id, external_username, modified_on, name, optlock, phone_number, properties, status, user_type, created_by, id, modified_by, scope_id FROM usr_user WHERE (name = ?) bind => [1 parameter bound] Query: ReadAllQuery(referenceClass=UserImpl sql="SELECT attributes, created_on, description, display_name, email, expiration_date, external_id, external_username, modified_on, name, optlock, phone_number, properties, status, user_type, created_by, id, modified_by, scope_id FROM usr_user WHERE (name = ?)") at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:318) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:150) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:172) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:349) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:316) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:585) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1681) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.incrementCallCount(DatasourceAccessor.java:324) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:622) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:567) at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2105) at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:603) at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:265) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:275) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:261) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:345) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:765) at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2776) at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2729) at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:584) at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1232) at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:913) at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1191) at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:485) at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1279) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:3004) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1898) at org.eclipse.persistence.internal.sessions.AbstractSession.retryQuery(AbstractSession.java:1969) at org.eclipse.persistence.sessions.server.ClientSession.retryQuery(ClientSession.java:706) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.retryQuery(UnitOfWorkImpl.java:5736) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1935) at org.eclipse.persistence.internal.sessions.AbstractSession.retryQuery(AbstractSession.java:1969) at org.eclipse.persistence.sessions.server.ClientSession.retryQuery(ClientSession.java:706) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.retryQuery(UnitOfWorkImpl.java:5736) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1935) at org.eclipse.persistence.internal.sessions.AbstractSession.retryQuery(AbstractSession.java:1969) at org.eclipse.persistence.sessions.server.ClientSession.retryQuery(ClientSession.java:706) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.retryQuery(UnitOfWorkImpl.java:5736) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1935) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1880) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1845) at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:262) ... 64 more Caused by: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms. at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:696) at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:197) at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:162) at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:128) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:138) ... 104 more
Standard Output
@jobsIntegration @env_docker Scenario: Executing Job And Then Restarting Device # features/jobScheduling/ExecuteOnDeviceConnectI9n.feature:197 09:40:40.902 [main] INFO eclipselink.logging.query - Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query. Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.12.v20230209-e5c4074ef3): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms. Error Code: 0 Call: SELECT attributes, created_on, description, display_name, email, expiration_date, external_id, external_username, modified_on, name, optlock, phone_number, properties, status, user_type, created_by, id, modified_by, scope_id FROM usr_user WHERE (name = ?) bind => [1 parameter bound] Query: ReadAllQuery(referenceClass=UserImpl sql="SELECT attributes, created_on, description, display_name, email, expiration_date, external_id, external_username, modified_on, name, optlock, phone_number, properties, status, user_type, created_by, id, modified_by, scope_id FROM usr_user WHERE (name = ?)"). 09:41:10.904 [main] INFO eclipselink.logging.query - Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query. Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.12.v20230209-e5c4074ef3): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms. Error Code: 0 Call: SELECT attributes, created_on, description, display_name, email, expiration_date, external_id, external_username, modified_on, name, optlock, phone_number, properties, status, user_type, created_by, id, modified_by, scope_id FROM usr_user WHERE (name = ?) bind => [1 parameter bound] Query: ReadAllQuery(referenceClass=UserImpl sql="SELECT attributes, created_on, description, display_name, email, expiration_date, external_id, external_username, modified_on, name, optlock, phone_number, properties, status, user_type, created_by, id, modified_by, scope_id FROM usr_user WHERE (name = ?)"). 09:41:45.905 [main] INFO eclipselink.logging.query - Communication failure detected when attempting to perform read query outside of a transaction. Attempting to retry query. Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.12.v20230209-e5c4074ef3): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms. Error Code: 0 Call: SELECT attributes, created_on, description, display_name, email, expiration_date, external_id, external_username, modified_on, name, optlock, phone_number, properties, status, user_type, created_by, id, modified_by, scope_id FROM usr_user WHERE (name = ?) bind => [1 parameter bound] Query: ReadAllQuery(referenceClass=UserImpl sql="SELECT attributes, created_on, description, display_name, email, expiration_date, external_id, external_username, modified_on, name, optlock, phone_number, properties, status, user_type, created_by, id, modified_by, scope_id FROM usr_user WHERE (name = ?)"). 09:42:20.907 [main] WARN eclipselink.logging.all - Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.12.v20230209-e5c4074ef3): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms. Error Code: 0 Call: SELECT attributes, created_on, description, display_name, email, expiration_date, external_id, external_username, modified_on, name, optlock, phone_number, properties, status, user_type, created_by, id, modified_by, scope_id FROM usr_user WHERE (name = ?) bind => [1 parameter bound] Query: ReadAllQuery(referenceClass=UserImpl sql="SELECT attributes, created_on, description, display_name, email, expiration_date, external_id, external_username, modified_on, name, optlock, phone_number, properties, status, user_type, created_by, id, modified_by, scope_id FROM usr_user WHERE (name = ?)") 09:42:20.908 [main] ERROR o.e.kapua.storage.TxManagerImpl - Non-recoverable exception, failing javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.12.v20230209-e5c4074ef3): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms. Error Code: 0 Call: SELECT attributes, created_on, description, display_name, email, expiration_date, external_id, external_username, modified_on, name, optlock, phone_number, properties, status, user_type, created_by, id, modified_by, scope_id FROM usr_user WHERE (name = ?) bind => [1 parameter bound] Query: ReadAllQuery(referenceClass=UserImpl sql="SELECT attributes, created_on, description, display_name, email, expiration_date, external_id, external_username, modified_on, name, optlock, phone_number, properties, status, user_type, created_by, id, modified_by, scope_id FROM usr_user WHERE (name = ?)") at org.eclipse.persistence.internal.jpa.QueryImpl.getDetailedException(QueryImpl.java:391) at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:264) at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:482) at org.eclipse.kapua.commons.jpa.KapuaEntityJpaRepository.doFindAllByField(KapuaEntityJpaRepository.java:678) at org.eclipse.kapua.commons.jpa.KapuaEntityJpaRepository.doFindByField(KapuaEntityJpaRepository.java:629) at org.eclipse.kapua.commons.jpa.KapuaNamedEntityJpaRepository.findByName(KapuaNamedEntityJpaRepository.java:52) at org.eclipse.kapua.commons.storage.KapuaNamedEntityRepositoryCachingWrapper.findByNameCached(KapuaNamedEntityRepositoryCachingWrapper.java:63) at org.eclipse.kapua.commons.storage.KapuaNamedEntityRepositoryCachingWrapper.findByName(KapuaNamedEntityRepositoryCachingWrapper.java:50) at org.eclipse.kapua.service.user.internal.UserServiceImpl.lambda$findByName$11(UserServiceImpl.java:288) at org.eclipse.kapua.storage.TxManagerImpl.execute(TxManagerImpl.java:50) at org.eclipse.kapua.service.user.internal.UserServiceImpl.findByName(UserServiceImpl.java:288) at org.eclipse.kapua.service.authentication.shiro.realm.UserPassAuthenticatingRealm.lambda$doGetAuthenticationInfo$0(UserPassAuthenticatingRealm.java:76) at org.eclipse.kapua.commons.security.KapuaSecurityUtils.doPrivileged(KapuaSecurityUtils.java:116) at org.eclipse.kapua.service.authentication.shiro.realm.UserPassAuthenticatingRealm.doGetAuthenticationInfo(UserPassAuthenticatingRealm.java:76) at org.apache.shiro.realm.AuthenticatingRealm.getAuthenticationInfo(AuthenticatingRealm.java:571) at org.eclipse.kapua.service.authentication.shiro.KapuaAuthenticator.doMultiRealmAuthentication(KapuaAuthenticator.java:61) at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doAuthenticate(ModularRealmAuthenticator.java:275) at org.apache.shiro.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:198) at org.apache.shiro.mgt.AuthenticatingSecurityManager.authenticate(AuthenticatingSecurityManager.java:106) at org.apache.shiro.mgt.DefaultSecurityManager.login(DefaultSecurityManager.java:275) at org.apache.shiro.subject.support.DelegatingSubject.login(DelegatingSubject.java:260) at org.eclipse.kapua.service.authentication.shiro.AuthenticationServiceShiroImpl.login(AuthenticationServiceShiroImpl.java:217) at org.eclipse.kapua.service.user.steps.UserServiceSteps.loginUser(UserServiceSteps.java:586) at jdk.internal.reflect.GeneratedMethodAccessor123.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at io.cucumber.java.Invoker.doInvoke(Invoker.java:66) at io.cucumber.java.Invoker.invoke(Invoker.java:24) at io.cucumber.java.AbstractGlueDefinition.invokeMethod(AbstractGlueDefinition.java:47) at io.cucumber.java.JavaStepDefinition.execute(JavaStepDefinition.java:29) at io.cucumber.core.runner.CoreStepDefinition.execute(CoreStepDefinition.java:66) at io.cucumber.core.runner.PickleStepDefinitionMatch.runStep(PickleStepDefinitionMatch.java:63) at io.cucumber.core.runner.ExecutionMode$1.execute(ExecutionMode.java:10) at io.cucumber.core.runner.TestStep.executeStep(TestStep.java:92) at io.cucumber.core.runner.TestStep.run(TestStep.java:64) at io.cucumber.core.runner.PickleStepTestStep.run(PickleStepTestStep.java:51) at io.cucumber.core.runner.TestCase.run(TestCase.java:104) at io.cucumber.core.runner.Runner.runPickle(Runner.java:73) at io.cucumber.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:151) at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:135) at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:27) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at io.cucumber.junit.Cucumber.runChild(Cucumber.java:200) at io.cucumber.junit.Cucumber.runChild(Cucumber.java:90) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at io.cucumber.junit.Cucumber$RunCucumber.evaluate(Cucumber.java:235) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:377) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:284) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:248) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:167) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:456) at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:169) at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:595) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:581) Caused by: org.eclipse.persistence.exceptions.DatabaseException: Internal Exception: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms. Error Code: 0 Call: SELECT attributes, created_on, description, display_name, email, expiration_date, external_id, external_username, modified_on, name, optlock, phone_number, properties, status, user_type, created_by, id, modified_by, scope_id FROM usr_user WHERE (name = ?) bind => [1 parameter bound] Query: ReadAllQuery(referenceClass=UserImpl sql="SELECT attributes, created_on, description, display_name, email, expiration_date, external_id, external_username, modified_on, name, optlock, phone_number, properties, status, user_type, created_by, id, modified_by, scope_id FROM usr_user WHERE (name = ?)") at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:318) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:150) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:172) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:349) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:316) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:585) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1681) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.incrementCallCount(DatasourceAccessor.java:324) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:622) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:567) at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2105) at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:603) at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:265) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:275) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:261) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:345) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:765) at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2776) at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2729) at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:584) at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1232) at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:913) at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1191) at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:485) at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1279) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:3004) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1898) at org.eclipse.persistence.internal.sessions.AbstractSession.retryQuery(AbstractSession.java:1969) at org.eclipse.persistence.sessions.server.ClientSession.retryQuery(ClientSession.java:706) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.retryQuery(UnitOfWorkImpl.java:5736) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1935) at org.eclipse.persistence.internal.sessions.AbstractSession.retryQuery(AbstractSession.java:1969) at org.eclipse.persistence.sessions.server.ClientSession.retryQuery(ClientSession.java:706) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.retryQuery(UnitOfWorkImpl.java:5736) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1935) at org.eclipse.persistence.internal.sessions.AbstractSession.retryQuery(AbstractSession.java:1969) at org.eclipse.persistence.sessions.server.ClientSession.retryQuery(ClientSession.java:706) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.retryQuery(UnitOfWorkImpl.java:5736) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1935) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1880) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1845) at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:262) ... 64 common frames omitted Caused by: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms. at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:696) at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:197) at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:162) at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:128) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:138) ... 104 common frames omitted An unexpected exception was raised: KapuaException with message: An internal error occurred: org.apache.shiro.ShiroException: Unexpected error while looking for the user!. Given I login as user with name "kapua-sys" and password "kapua-password" # org.eclipse.kapua.service.user.steps.UserServiceSteps.loginUser(java.lang.String,java.lang.String) org.eclipse.kapua.KapuaException: An internal error occurred: org.apache.shiro.ShiroException: Unexpected error while looking for the user!. at org.eclipse.kapua.KapuaException.internalError(KapuaException.java:99) at org.eclipse.kapua.service.authentication.shiro.AuthenticationServiceShiroImpl.handleTokenLoginException(AuthenticationServiceShiroImpl.java:523) at org.eclipse.kapua.service.authentication.shiro.AuthenticationServiceShiroImpl.login(AuthenticationServiceShiroImpl.java:234) at org.eclipse.kapua.service.user.steps.UserServiceSteps.loginUser(UserServiceSteps.java:586) at ✽.I login as user with name "kapua-sys" and password "kapua-password"(classpath:features/jobScheduling/ExecuteOnDeviceConnectI9n.feature:207) Caused by: org.apache.shiro.authc.AuthenticationException: org.apache.shiro.ShiroException: Unexpected error while looking for the user! at org.eclipse.kapua.service.authentication.shiro.KapuaAuthenticator.doMultiRealmAuthentication(KapuaAuthenticator.java:87) at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doAuthenticate(ModularRealmAuthenticator.java:275) at org.apache.shiro.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:198) at org.apache.shiro.mgt.AuthenticatingSecurityManager.authenticate(AuthenticatingSecurityManager.java:106) at org.apache.shiro.mgt.DefaultSecurityManager.login(DefaultSecurityManager.java:275) at org.apache.shiro.subject.support.DelegatingSubject.login(DelegatingSubject.java:260) at org.eclipse.kapua.service.authentication.shiro.AuthenticationServiceShiroImpl.login(AuthenticationServiceShiroImpl.java:217) at org.eclipse.kapua.service.user.steps.UserServiceSteps.loginUser(UserServiceSteps.java:586) at jdk.internal.reflect.GeneratedMethodAccessor123.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at io.cucumber.java.Invoker.doInvoke(Invoker.java:66) at io.cucumber.java.Invoker.invoke(Invoker.java:24) at io.cucumber.java.AbstractGlueDefinition.invokeMethod(AbstractGlueDefinition.java:47) at io.cucumber.java.JavaStepDefinition.execute(JavaStepDefinition.java:29) at io.cucumber.core.runner.CoreStepDefinition.execute(CoreStepDefinition.java:66) at io.cucumber.core.runner.PickleStepDefinitionMatch.runStep(PickleStepDefinitionMatch.java:63) at io.cucumber.core.runner.ExecutionMode$1.execute(ExecutionMode.java:10) at io.cucumber.core.runner.TestStep.executeStep(TestStep.java:92) at io.cucumber.core.runner.TestStep.run(TestStep.java:64) at io.cucumber.core.runner.PickleStepTestStep.run(PickleStepTestStep.java:51) at io.cucumber.core.runner.TestCase.run(TestCase.java:104) at io.cucumber.core.runner.Runner.runPickle(Runner.java:73) at io.cucumber.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:151) at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:135) at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:27) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at io.cucumber.junit.Cucumber.runChild(Cucumber.java:200) at io.cucumber.junit.Cucumber.runChild(Cucumber.java:90) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at io.cucumber.junit.Cucumber$RunCucumber.evaluate(Cucumber.java:235) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:377) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:284) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:248) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:167) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:456) at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:169) at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:595) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:581) Caused by: org.apache.shiro.ShiroException: Unexpected error while looking for the user! at org.eclipse.kapua.service.authentication.shiro.realm.UserPassAuthenticatingRealm.doGetAuthenticationInfo(UserPassAuthenticatingRealm.java:80) at org.apache.shiro.realm.AuthenticatingRealm.getAuthenticationInfo(AuthenticatingRealm.java:571) at org.eclipse.kapua.service.authentication.shiro.KapuaAuthenticator.doMultiRealmAuthentication(KapuaAuthenticator.java:61) ... 50 more Caused by: org.eclipse.kapua.KapuaException: An internal error occurred: Error during Persistence Operation. at org.eclipse.kapua.KapuaException.internalError(KapuaException.java:84) at org.eclipse.kapua.commons.util.KapuaExceptionUtils.convertPersistenceException(KapuaExceptionUtils.java:107) at org.eclipse.kapua.commons.jpa.JpaTxContext.convertPersistenceException(JpaTxContext.java:78) at org.eclipse.kapua.storage.TxManagerImpl.execute(TxManagerImpl.java:61) at org.eclipse.kapua.service.user.internal.UserServiceImpl.findByName(UserServiceImpl.java:288) at org.eclipse.kapua.service.authentication.shiro.realm.UserPassAuthenticatingRealm.lambda$doGetAuthenticationInfo$0(UserPassAuthenticatingRealm.java:76) at org.eclipse.kapua.commons.security.KapuaSecurityUtils.doPrivileged(KapuaSecurityUtils.java:116) at org.eclipse.kapua.service.authentication.shiro.realm.UserPassAuthenticatingRealm.doGetAuthenticationInfo(UserPassAuthenticatingRealm.java:76) ... 52 more Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.12.v20230209-e5c4074ef3): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms. Error Code: 0 Call: SELECT attributes, created_on, description, display_name, email, expiration_date, external_id, external_username, modified_on, name, optlock, phone_number, properties, status, user_type, created_by, id, modified_by, scope_id FROM usr_user WHERE (name = ?) bind => [1 parameter bound] Query: ReadAllQuery(referenceClass=UserImpl sql="SELECT attributes, created_on, description, display_name, email, expiration_date, external_id, external_username, modified_on, name, optlock, phone_number, properties, status, user_type, created_by, id, modified_by, scope_id FROM usr_user WHERE (name = ?)") at org.eclipse.persistence.internal.jpa.QueryImpl.getDetailedException(QueryImpl.java:391) at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:264) at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:482) at org.eclipse.kapua.commons.jpa.KapuaEntityJpaRepository.doFindAllByField(KapuaEntityJpaRepository.java:678) at org.eclipse.kapua.commons.jpa.KapuaEntityJpaRepository.doFindByField(KapuaEntityJpaRepository.java:629) at org.eclipse.kapua.commons.jpa.KapuaNamedEntityJpaRepository.findByName(KapuaNamedEntityJpaRepository.java:52) at org.eclipse.kapua.commons.storage.KapuaNamedEntityRepositoryCachingWrapper.findByNameCached(KapuaNamedEntityRepositoryCachingWrapper.java:63) at org.eclipse.kapua.commons.storage.KapuaNamedEntityRepositoryCachingWrapper.findByName(KapuaNamedEntityRepositoryCachingWrapper.java:50) at org.eclipse.kapua.service.user.internal.UserServiceImpl.lambda$findByName$11(UserServiceImpl.java:288) at org.eclipse.kapua.storage.TxManagerImpl.execute(TxManagerImpl.java:50) ... 56 more Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.12.v20230209-e5c4074ef3): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms. Error Code: 0 Call: SELECT attributes, created_on, description, display_name, email, expiration_date, external_id, external_username, modified_on, name, optlock, phone_number, properties, status, user_type, created_by, id, modified_by, scope_id FROM usr_user WHERE (name = ?) bind => [1 parameter bound] Query: ReadAllQuery(referenceClass=UserImpl sql="SELECT attributes, created_on, description, display_name, email, expiration_date, external_id, external_username, modified_on, name, optlock, phone_number, properties, status, user_type, created_by, id, modified_by, scope_id FROM usr_user WHERE (name = ?)") at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:318) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:150) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:172) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:349) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:316) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:585) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1681) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.incrementCallCount(DatasourceAccessor.java:324) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:622) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:567) at org.eclipse.persistence.internal.sessions.AbstractSession.basicExecuteCall(AbstractSession.java:2105) at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:603) at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:265) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:275) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:261) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:345) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:765) at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2776) at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2729) at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:584) at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1232) at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:913) at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1191) at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:485) at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1279) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:3004) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1898) at org.eclipse.persistence.internal.sessions.AbstractSession.retryQuery(AbstractSession.java:1969) at org.eclipse.persistence.sessions.server.ClientSession.retryQuery(ClientSession.java:706) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.retryQuery(UnitOfWorkImpl.java:5736) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1935) at org.eclipse.persistence.internal.sessions.AbstractSession.retryQuery(AbstractSession.java:1969) at org.eclipse.persistence.sessions.server.ClientSession.retryQuery(ClientSession.java:706) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.retryQuery(UnitOfWorkImpl.java:5736) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1935) at org.eclipse.persistence.internal.sessions.AbstractSession.retryQuery(AbstractSession.java:1969) at org.eclipse.persistence.sessions.server.ClientSession.retryQuery(ClientSession.java:706) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.retryQuery(UnitOfWorkImpl.java:5736) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1935) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1880) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1845) at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:262) ... 64 more Caused by: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms. at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:696) at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:197) at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:162) at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:128) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:138) ... 104 more And I start the Kura Mock # org.eclipse.kapua.service.device.registry.steps.BrokerSteps.startKuraMock() When Device is connected within 10 seconds # org.eclipse.kapua.service.device.registry.steps.BrokerSteps.deviceConnected(int) Then Device status is "CONNECTED" within 10 seconds # org.eclipse.kapua.service.device.registry.steps.BrokerSteps.deviceStatusIs(java.lang.String,int) When KuraMock is disconnected # org.eclipse.kapua.service.device.registry.steps.BrokerSteps.kuraMockDisconnected() And I wait 1 second # org.eclipse.kapua.qa.common.BasicSteps.waitSeconds(int) Then Device status is "DISCONNECTED" within 10 seconds # org.eclipse.kapua.service.device.registry.steps.BrokerSteps.deviceStatusIs(java.lang.String,int) And I select account "kapua-sys" # org.eclipse.kapua.service.account.steps.AccountServiceSteps.selectAccount(java.lang.String) And I get the KuraMock device after 5 seconds # org.eclipse.kapua.service.device.registry.steps.BrokerSteps.getKuraMockDevice(int) When I search for events from device "rpione3" in account "kapua-sys" I find 2 events within 30 seconds # org.eclipse.kapua.service.device.registry.steps.DeviceRegistrySteps.searchForEventsFromDeviceWithClientID(java.lang.String,java.lang.String,int,int) And The type of the last event is "DEATH" # org.eclipse.kapua.service.device.registry.steps.DeviceRegistrySteps.checkLastEventType(java.lang.String) Given I create a job with the name "TestJob" # org.eclipse.kapua.service.job.steps.JobServiceSteps.createANamedJob(java.lang.String) And A new job target item # org.eclipse.kapua.service.job.steps.JobTargetServiceSteps.createANewTarget() And Search for step definition with the name "Command Execution" # org.eclipse.kapua.service.job.steps.JobStepDefinitionServiceSteps.searchARegularStepDefinitionWithProperties(java.lang.String) And I prepare a JobStepCreator with the name "TestStep" and the following properties # org.eclipse.kapua.service.job.steps.JobStepServiceSteps.iPrepareAJobStepCreatorWithPropertyList(java.lang.String,java.util.List<org.eclipse.kapua.qa.common.cucumber.CucJobStepProperty>) When I create a new JobStep from the existing creator # org.eclipse.kapua.service.job.steps.JobStepServiceSteps.iCreateAJobStepFromTheCreator() Then No exception was thrown # org.eclipse.kapua.qa.common.BasicSteps.noExceptionCaught() And I find scheduler properties with name "Device Connect" # org.eclipse.kapua.service.scheduler.steps.JobScheduleServiceSteps.iFindTriggerPropertiesWithName(java.lang.String) And A regular trigger creator with the name "TestSchedule1" is created # org.eclipse.kapua.service.scheduler.steps.JobScheduleServiceSteps.aRegularTriggerCreatorWithTheName(java.lang.String) And The trigger is set to start today at "00:00" # org.eclipse.kapua.service.scheduler.steps.JobScheduleServiceSteps.setTodayAsTriggerStartDate(java.lang.String) Then I create a new trigger from the existing creator with previously defined date properties # org.eclipse.kapua.service.scheduler.steps.JobScheduleServiceSteps.createTriggerWithDateProperties() And I restart the Kura Mock # org.eclipse.kapua.service.device.registry.steps.BrokerSteps.restartKuraMock() When Device is connected within 10 seconds # org.eclipse.kapua.service.device.registry.steps.BrokerSteps.deviceConnected(int) And I wait 14 seconds # org.eclipse.kapua.qa.common.BasicSteps.waitSeconds(int) When I search for events from device "rpione3" in account "kapua-sys" I find 4 events within 30 seconds # org.eclipse.kapua.service.device.registry.steps.DeviceRegistrySteps.searchForEventsFromDeviceWithClientID(java.lang.String,java.lang.String,int,int) And The type of the last event is "COMMAND" # org.eclipse.kapua.service.device.registry.steps.DeviceRegistrySteps.checkLastEventType(java.lang.String) Then KuraMock is disconnected # org.eclipse.kapua.service.device.registry.steps.BrokerSteps.kuraMockDisconnected() And I wait 3 seconds # org.eclipse.kapua.qa.common.BasicSteps.waitSeconds(int) When I restart the Kura Mock # org.eclipse.kapua.service.device.registry.steps.BrokerSteps.restartKuraMock() Then Device is connected within 10 seconds # org.eclipse.kapua.service.device.registry.steps.BrokerSteps.deviceConnected(int) And I query for the job with the name "TestJob" and I count 1 execution item and I confirm the executed job is finished within 20 seconds # org.eclipse.kapua.service.job.steps.JobExecutionServiceSteps.iQueryForTheJobWithTheNameAndJobExecutionCountAndExecutionStatus(java.lang.String,int,int) And I search for the last job target in the database # org.eclipse.kapua.service.job.steps.JobTargetServiceSteps.findLastJobTarget() And I confirm the step index is 0 and status is "PROCESS_OK" # org.eclipse.kapua.service.job.steps.JobTargetServiceSteps.checkStepIndexAndStatus(int,java.lang.String) When I search for events from device "rpione3" in account "kapua-sys" I find 6 events within 30 seconds # org.eclipse.kapua.service.device.registry.steps.DeviceRegistrySteps.searchForEventsFromDeviceWithClientID(java.lang.String,java.lang.String,int,int) And The type of the last event is "BIRTH" # org.eclipse.kapua.service.device.registry.steps.DeviceRegistrySteps.checkLastEventType(java.lang.String) And I logout # org.eclipse.kapua.service.user.steps.UserServiceSteps.logout() 09:42:20.918 [main] INFO o.eclipse.kapua.qa.common.BasicSteps - Database cleanup... 09:42:20.918 [main] INFO o.e.k.c.c.KapuaConfigurableServiceSchemaUtilsWithResources - Running database script from resources... 09:42:20.918 [main] INFO o.e.k.c.jpa.SimpleSqlScriptExecutor - Running resources script: sql/all_delete.sql 09:42:50.919 [main] INFO eclipselink.logging.transaction - Communication failure detected when attempting to create transaction on database. Attempting to retry begin transaction. Error was: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.12.v20230209-e5c4074ef3): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms. Error Code: 0. 09:44:20.924 [main] WARN eclipselink.logging.all - Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.12.v20230209-e5c4074ef3): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms. Error Code: 0 javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.12.v20230209-e5c4074ef3): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms. Error Code: 0 Query: DataModifyQuery(sql="/******************************************************************************* * Copyright (c) 2017, 2022 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Eurotech - initial API and implementation *******************************************************************************/ UPDATE act_account SET scope_id = null; DELETE FROM act_account WHERE id NOT IN (1); DELETE FROM atht_credential WHERE NOT (scope_id = 1 AND id IN (1, 2, 3)); DELETE FROM atht_access_token; DELETE FROM atht_mfa_option; DELETE FROM atht_scratch_code; DELETE FROM athz_role WHERE NOT (scope_id = 1 AND id = 1); DELETE FROM athz_role_permission WHERE NOT (scope_id = 1 AND role_id = 1); DELETE FROM dvc_device_connection; DELETE FROM dvc_device; DELETE FROM dvc_device_event; DELETE FROM sys_configuration WHERE NOT (scope_id = 1 AND id IN (1, 2, 3, 4, 5, 6, 7, 8, 9)); DELETE FROM usr_user WHERE NOT (scope_id = 1 AND id IN (1, 2)); DELETE FROM athz_access_info WHERE NOT (scope_id = 1 AND id IN (1, 2)); DELETE FROM athz_access_permission WHERE NOT (scope_id = 1 AND id = 1); DELETE FROM athz_access_role WHERE NOT (scope_id = 1 AND id = 1); DELETE FROM athz_domain_actions WHERE domain_id NOT IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21); DELETE FROM athz_domain WHERE NOT (scope_id IS null AND id IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21)); DELETE FROM athz_group; DELETE FROM tag_tag; DELETE FROM job_job; DELETE FROM job_job_execution; DELETE FROM job_job_step; DELETE FROM job_job_step_definition WHERE id NOT IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10); DELETE FROM job_job_step_definition_properties WHERE step_definition_id NOT IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10); DELETE FROM job_job_step_properties; DELETE FROM job_job_target; DELETE FROM schdl_trigger; DELETE FROM schdl_trigger_properties; DELETE FROM endp_endpoint_info; ") at org.eclipse.persistence.internal.jpa.QueryImpl.executeUpdate(QueryImpl.java:312) at org.eclipse.kapua.commons.jpa.ResourceSqlScriptExecutor.executeUpdate(ResourceSqlScriptExecutor.java:106) at org.eclipse.kapua.commons.configuration.KapuaConfigurableServiceSchemaUtilsWithResources.scriptSession(KapuaConfigurableServiceSchemaUtilsWithResources.java:52) at org.eclipse.kapua.qa.common.DBHelper.deleteAll(DBHelper.java:102) at org.eclipse.kapua.qa.common.BasicSteps.afterScenarioDocker(BasicSteps.java:444) at org.eclipse.kapua.qa.common.BasicSteps.afterScenarioDockerFull(BasicSteps.java:415) Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.12.v20230209-e5c4074ef3): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms. Error Code: 0 Query: DataModifyQuery(sql="/******************************************************************************* * Copyright (c) 2017, 2022 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 * which is available at https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Eurotech - initial API and implementation *******************************************************************************/ UPDATE act_account SET scope_id = null; DELETE FROM act_account WHERE id NOT IN (1); DELETE FROM atht_credential WHERE NOT (scope_id = 1 AND id IN (1, 2, 3)); DELETE FROM atht_access_token; DELETE FROM atht_mfa_option; DELETE FROM atht_scratch_code; DELETE FROM athz_role WHERE NOT (scope_id = 1 AND id = 1); DELETE FROM athz_role_permission WHERE NOT (scope_id = 1 AND role_id = 1); DELETE FROM dvc_device_connection; DELETE FROM dvc_device; DELETE FROM dvc_device_event; DELETE FROM sys_configuration WHERE NOT (scope_id = 1 AND id IN (1, 2, 3, 4, 5, 6, 7, 8, 9)); DELETE FROM usr_user WHERE NOT (scope_id = 1 AND id IN (1, 2)); DELETE FROM athz_access_info WHERE NOT (scope_id = 1 AND id IN (1, 2)); DELETE FROM athz_access_permission WHERE NOT (scope_id = 1 AND id = 1); DELETE FROM athz_access_role WHERE NOT (scope_id = 1 AND id = 1); DELETE FROM athz_domain_actions WHERE domain_id NOT IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21); DELETE FROM athz_domain WHERE NOT (scope_id IS null AND id IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21)); DELETE FROM athz_group; DELETE FROM tag_tag; DELETE FROM job_job; DELETE FROM job_job_execution; DELETE FROM job_job_step; DELETE FROM job_job_step_definition WHERE id NOT IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10); DELETE FROM job_job_step_definition_properties WHERE step_definition_id NOT IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10); DELETE FROM job_job_step_properties; DELETE FROM job_job_target; DELETE FROM schdl_trigger; DELETE FROM schdl_trigger_properties; DELETE FROM endp_endpoint_info; ") at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:318) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:150) at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:172) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:349) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:316) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.reconnect(DatasourceAccessor.java:585) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.reconnect(DatabaseAccessor.java:1681) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.incrementCallCount(DatasourceAccessor.java:324) at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.beginTransaction(DatasourceAccessor.java:257) at org.eclipse.persistence.sessions.server.ClientSession.retryTransaction(ClientSession.java:790) at org.eclipse.persistence.internal.sessions.AbstractSession.basicBeginTransaction(AbstractSession.java:753) at org.eclipse.persistence.sessions.server.ClientSession.addWriteConnection(ClientSession.java:759) at org.eclipse.persistence.sessions.server.ServerSession.acquireClientConnection(ServerSession.java:271) at org.eclipse.persistence.sessions.server.ClientSession.executeCall(ClientSession.java:284) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:275) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:261) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeNoSelectCall(DatasourceCallQueryMechanism.java:317) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeNoSelect(DatasourceCallQueryMechanism.java:288) at org.eclipse.persistence.queries.DataModifyQuery.executeDatabaseQuery(DataModifyQuery.java:87) at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:913) at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:812) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:3004) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1898) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1880) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1845) at org.eclipse.persistence.internal.jpa.QueryImpl.executeUpdate(QueryImpl.java:302) at org.eclipse.kapua.commons.jpa.ResourceSqlScriptExecutor.executeUpdate(ResourceSqlScriptExecutor.java:106) at org.eclipse.kapua.commons.configuration.KapuaConfigurableServiceSchemaUtilsWithResources.scriptSession(KapuaConfigurableServiceSchemaUtilsWithResources.java:52) at org.eclipse.kapua.qa.common.DBHelper.deleteAll(DBHelper.java:102) at org.eclipse.kapua.qa.common.BasicSteps.afterScenarioDocker(BasicSteps.java:444) at org.eclipse.kapua.qa.common.BasicSteps.afterScenarioDockerFull(BasicSteps.java:415) at jdk.internal.reflect.GeneratedMethodAccessor130.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at io.cucumber.java.Invoker.doInvoke(Invoker.java:66) at io.cucumber.java.Invoker.invoke(Invoker.java:24) at io.cucumber.java.AbstractGlueDefinition.invokeMethod(AbstractGlueDefinition.java:47) at io.cucumber.java.JavaHookDefinition.execute(JavaHookDefinition.java:59) at io.cucumber.core.runner.CoreHookDefinition.execute(CoreHookDefinition.java:46) at io.cucumber.core.runner.HookDefinitionMatch.runStep(HookDefinitionMatch.java:21) at io.cucumber.core.runner.ExecutionMode$1.execute(ExecutionMode.java:10) at io.cucumber.core.runner.TestStep.executeStep(TestStep.java:92) at io.cucumber.core.runner.TestStep.run(TestStep.java:64) at io.cucumber.core.runner.TestCase.run(TestCase.java:110) at io.cucumber.core.runner.Runner.runPickle(Runner.java:73) at io.cucumber.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:151) at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:135) at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:27) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at io.cucumber.junit.Cucumber.runChild(Cucumber.java:200) at io.cucumber.junit.Cucumber.runChild(Cucumber.java:90) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at io.cucumber.junit.Cucumber$RunCucumber.evaluate(Cucumber.java:235) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:377) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:284) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:248) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:167) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:456) at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:169) at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:595) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:581) Caused by: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 30000ms. at com.zaxxer.hikari.pool.HikariPool.createTimeoutException(HikariPool.java:696) at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:197) at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:162) at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:128) at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:138) ... 71 more